package com.nmf.dao.gen;

import com.nmf.dao.gen.bean.BaseCollege;
import com.nmf.dao.gen.bean.BaseCollegeExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface BaseCollegeMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table base_college
     */
    @SelectProvider(type=BaseCollegeSqlProvider.class, method="countByExample")
    long countByExample(BaseCollegeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table base_college
     */
    @DeleteProvider(type=BaseCollegeSqlProvider.class, method="deleteByExample")
    int deleteByExample(BaseCollegeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table base_college
     */
    @Delete({
        "delete from base_college",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table base_college
     */
    @Insert({
        "insert into base_college (id, college_name, ",
        "college_code, province_id, ",
        "province_name, location, ",
        "level, category_id, ",
        "category_name, remark, ",
        "create_date, update_date)",
        "values (#{id,jdbcType=VARCHAR}, #{collegeName,jdbcType=VARCHAR}, ",
        "#{collegeCode,jdbcType=VARCHAR}, #{provinceId,jdbcType=VARCHAR}, ",
        "#{provinceName,jdbcType=VARCHAR}, #{location,jdbcType=VARCHAR}, ",
        "#{level,jdbcType=VARCHAR}, #{categoryId,jdbcType=VARCHAR}, ",
        "#{categoryName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, ",
        "#{createDate,jdbcType=TIMESTAMP}, #{updateDate,jdbcType=TIMESTAMP})"
    })
    int insert(BaseCollege record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table base_college
     */
    @InsertProvider(type=BaseCollegeSqlProvider.class, method="insertSelective")
    int insertSelective(BaseCollege record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table base_college
     */
    @SelectProvider(type=BaseCollegeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="college_name", property="collegeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="college_code", property="collegeCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="province_id", property="provinceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="province_name", property="provinceName", jdbcType=JdbcType.VARCHAR),
        @Result(column="location", property="location", jdbcType=JdbcType.VARCHAR),
        @Result(column="level", property="level", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_id", property="categoryId", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_name", property="categoryName", jdbcType=JdbcType.VARCHAR),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    List<BaseCollege> selectByExample(BaseCollegeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table base_college
     */
    @Select({
        "select",
        "id, college_name, college_code, province_id, province_name, location, level, ",
        "category_id, category_name, remark, create_date, update_date",
        "from base_college",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="college_name", property="collegeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="college_code", property="collegeCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="province_id", property="provinceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="province_name", property="provinceName", jdbcType=JdbcType.VARCHAR),
        @Result(column="location", property="location", jdbcType=JdbcType.VARCHAR),
        @Result(column="level", property="level", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_id", property="categoryId", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_name", property="categoryName", jdbcType=JdbcType.VARCHAR),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    BaseCollege selectByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table base_college
     */
    @UpdateProvider(type=BaseCollegeSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") BaseCollege record, @Param("example") BaseCollegeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table base_college
     */
    @UpdateProvider(type=BaseCollegeSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") BaseCollege record, @Param("example") BaseCollegeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table base_college
     */
    @UpdateProvider(type=BaseCollegeSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(BaseCollege record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table base_college
     */
    @Update({
        "update base_college",
        "set college_name = #{collegeName,jdbcType=VARCHAR},",
          "college_code = #{collegeCode,jdbcType=VARCHAR},",
          "province_id = #{provinceId,jdbcType=VARCHAR},",
          "province_name = #{provinceName,jdbcType=VARCHAR},",
          "location = #{location,jdbcType=VARCHAR},",
          "level = #{level,jdbcType=VARCHAR},",
          "category_id = #{categoryId,jdbcType=VARCHAR},",
          "category_name = #{categoryName,jdbcType=VARCHAR},",
          "remark = #{remark,jdbcType=VARCHAR},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(BaseCollege record);
}